<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Mobile
 * @copyright  Copyright (c) 2010-2011 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
?>
<div>
    <div class="dashboard-block">
        <div class="page-head">
            <h3><?php echo $this->__('Points & Rewards Invitation') ?></h3>
            <a class="edit" href="<?php echo $this->getUrl('points/invitation/index') ?>"><img src="<?php echo $this->getSkinUrl('images/edit.gif') ?>" alt="<?php echo $this->__('Edit') ?>" /></a>
        </div>
        <?php $block = $this->getLayout()->createBlock('points/customer_invitation_list');?>
        <div class="content">
            <?php if ($block->hasInvitees()): ?>
                    <fieldset>
                    <table class="data-table" id="invitelist-table">
                        <thead>
                            <tr>
                                <th><?php echo $this->__('E-mail') ?></th>
                                <th><?php echo $this->__('Status') ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($block->getCollection() as $item): ?>
                                <tr>
                                    <td>
                                        <span class="nobr"><?php echo $item->getEmail() ?></span>
                                    </td>
                                    <td>
                                        <span class="nobr"><?php echo $item->getStatus() ?></span>
                                    </td>
                                </tr>
                            <?php endforeach ?>
                            </tbody>
                        </table>
                        <script type="text/javascript">decorateTable('invitelist-table')</script>
                </fieldset>
            <?php else: ?>
              <p><?php echo $this->__("You haven't sent any invitation yet") ?></p>
            <?php endif ?>
        </div>
    </div>
</div>